package com.yiyahui.framework.config;

import com.yiyahui.common.utils.SMSUtils;
import com.yiyahui.framework.config.properties.SMSPropertis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 程序注解配置
 *
 * @author ruoyi
 */
@Configuration
@EnableConfigurationProperties(SMSPropertis.class)
public class SMSConfig
{
    @Autowired
    SMSPropertis smsPropertis;

    /**
     * oss组件
     * @return AliyunOSSUtil
     */
    @Bean
    public SMSUtils SMSUtil(){
        final SMSUtils SMSUtil = new SMSUtils();
        SMSUtil.setSMSPropertis(smsPropertis);
        return SMSUtil;
    }
}
